package com.jyu.apts.dto;

import com.jyu.apts.entity.Organization;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class OrganizationDto {
	long id;
	String name;//名称
	String province;//省份
	String city;//城市
	String part;//区/县
	String banner;//大图
	String logo;//logo
	String address;//地址
	String phone;//手机
	String description;//描述
	String email;//邮箱
	String latitude;//纬度
	String longitude;//经度
	long hot;//热度
	
	public OrganizationDto convert(Organization organization) {
		setId(organization.getId());
		setName(organization.getName());
		setProvince(organization.getProvince());
		setCity(organization.getCity());
		setPart(organization.getPart());
		setBanner(organization.getBanner());
		setEmail(organization.getEmail());
		setLogo(organization.getLogo());
		setAddress(organization.getAddress());
		setPhone(organization.getPhone());
		setDescription(organization.getDescription());
		setLatitude(organization.getLatitude());
		setLongitude(organization.getLongitude());
		setHot(organization.getHot());
		return this;
	}
}
